export default {
  data() {
    return {
      ids: [],
      title: "添加用户",
      visible: false,
      list: [],
      // 1添加 2编辑 3分配
      etype: 1,

      // 树形菜单的渲染配置
      tree: [],
      defaultProps: {
        children: "children",
        label: "authName",
      },
    };
  },
  methods: {
    findIDs(tree) {
      // 开启查询
      for (var i = 0; i < tree.length; i++) {
        if (tree[i].id) {
          this.ids.push(tree[i].id);
          if (tree[i].children) {
            this.findIDs(tree[i].children);
          }
        }
      }
      return this.ids;
    },
  },
};
